import { cdn } from "vite-plugin-cdn2";
import { unpkg } from "vite-plugin-cdn2/resolver/unpkg";

export function enableCDN(isEnabled: boolean) {
  if (isEnabled === true) {
    return cdn({
      resolve: unpkg(),
      modules: [
        "vue",
        "vue-demi",
        "pinia2",
        "pinia3",
        "axios",
        "vant",
        "vue-router"
      ]
    });
  }
}
